package com.neuedu.web.resouece;

import java.io.InputStream;
import java.util.Locale;
import java.util.Properties;
import java.util.ResourceBundle;

public class ResourceUtils {


    public static void main(String[] args) {

        //
        // InputStream is = ResourceUtils.class.getClassLoader().getResourceAsStream("");
        // Properties properties = new Properties();
        // properties.load(is);


        //bundle 资源 束
        ResourceBundle bundle = ResourceBundle.getBundle("myresource" ,new Locale("en","US"));

        String key1 = bundle.getString("key1");
        System.out.println(key1);

        String key2 = bundle.getString("key2");
        System.out.println(key2);


        String str ="My name is axxxxx";
        System.out.println("str.contains(\"name\") = " + str.contains("name"));
        System.out.println("str.contains(\"NAME\") = " + str.contains("NAME"));
    }


}
